-- bookshelf
-- created by chendh
-- 地牢格子：废弃的书架

return {
    restoreGrid = function(grid, info)
        -- 还原状态
        if info.options.e then
            info["options"] = info["options"]:toTable();
        end
        grid.options = info["options"] or {};
    end,

    collectContext = function(grid)
        -- 收集
        return { ["options"] = grid.options or {}, };
    end,

    autoFight = function(grid)
        local pos = grid:getPos();
        for index = 1, 6 do
            DungeonActionM.go("bookshelf", pos, index);
        end
        return true;
    end
};
